package top.lenjon.lib.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;
import java.io.Serializable;

import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 借阅记录
 * </p>
 *
 * @author wei
 * @since 2020-11-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class Log implements Serializable {

    private static final long serialVersionUID = 1L;

    public Log(Integer borrowerId, LocalDateTime borrowTime, Integer bookId) {
        this.borrowerId = borrowerId;
        this.bookId = bookId;
        this.borrowTime = borrowTime;
    }

    /**
     * 大坑！！！！
     * @param
     * @return
     */
    public Log() {

    }

    /**
     * 主键id
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 借阅人id
     */
    private Integer borrowerId;

    /**
     * 借阅时间
     */
    private LocalDateTime borrowTime;

    /**
     * 还书时间
     */
    private LocalDateTime returnTime;

    /**
     * 续借次数
     */
    private Integer renewTimes;

    /**
     * 所借书籍id
     */
    private Integer bookId;


}
